#ifndef CABIN_H_
#define CABIN_H_

#include "listeners/KeyListener.h"
#include "base/GLStructure.h"
#include "base/GLObject.h"
#include "base/Cube.h"
#include "structure/Boom.h"

class Cabin : public GLStructure, public KeyListener {
private:
	std::list<GLObject*> components;
	std::list<GLStructure*> structures;
	float widthX;
	float widthY;
	float height;

	Cube* cabin;
	Cube* counterweight;
	Boom* boom;

	float cabinRotationAngle;

	static const char cabinLeft;
	static const char cabinRight;

	//! Called when a key is pressed on keyboard
	void OnKeyDown(int nKey, char cAscii);

public:
	Cabin(GLuint programHandler, GLShaderConfig shaderConfig, float widthX, float widthY, float height);
	~Cabin();
	void updateComponents();
	void update (glm::mat4 viewMatrix, glm::mat4 modelMatrix);
};


#endif /* CABIN_H_ */
